package com.example.inoculations.controller;

import com.example.inoculations.service.IFileService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("/file")
public class FileController {

    @Resource
    private IFileService fileService;

    @PostMapping("/admin/upload")
    public String upload(@RequestParam("filename") MultipartFile file) {
        System.out.println(file+"aaaa");
        return fileService.upload(file);
    }
}
